3.10 \(\int x^3 (a+b \csc (c+d x^2))^2 \, dx\)

Optimal. Leaf size=125 \[ \frac{i a b \text{PolyLog}\left (2,-e^{i \left (c+d x^2\right )}\right )}{d^2}-\frac{i a b \text{PolyLog}\left (2,e^{i \left (c+d x^2\right )}\right )}{d^2}+\frac{a^2 x^4}{4}-\frac{2 a b x^2 \tanh ^{-1}\left (e^{i \left (c+d x^2\right )}\right )}{d}+\frac{b^2 \log \left (\sin \left (c+d x^2\right )\right )}{2 d^2}-\frac{b^2 x^2 \cot \left (c+d x^2\right )}{2 d} \]

[Out]

(a^2*x^4)/4 - (2*a*b*x^2*ArcTanh[E^(I*(c + d*x^2))])/d - (b^2*x^2*Cot[c + d*x^2])/(2*d) + (b^2*Log[Sin[c + d*x
^2]])/(2*d^2) + (I*a*b*PolyLog[2, -E^(I*(c + d*x^2))])/d^2 - (I*a*b*PolyLog[2, E^(I*(c + d*x^2))])/d^2

________________________________________________________________________________________

Rubi [A]  time = 0.158748, antiderivative size = 125, normalized size of antiderivative = 1., number of steps used = 10, number of rules used = 7, integrand size = 18, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.389, Rules used = {4205, 4190, 4183, 2279, 2391, 4184, 3475} \[ \frac{i a b \text{PolyLog}\left (2,-e^{i \left (c+d x^2\right )}\right )}{d^2}-\frac{i a b \text{PolyLog}\left (2,e^{i \left (c+d x^2\right )}\right )}{d^2}+\frac{a^2 x^4}{4}-\frac{2 a b x^2 \tanh ^{-1}\left (e^{i \left (c+d x^2\right )}\right )}{d}+\frac{b^2 \log \left (\sin \left (c+d x^2\right )\right )}{2 d^2}-\frac{b^2 x^2 \cot \left (c+d x^2\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[x^3*(a + b*Csc[c + d*x^2])^2,x]

[Out]

(a^2*x^4)/4 - (2*a*b*x^2*ArcTanh[E^(I*(c + d*x^2))])/d - (b^2*x^2*Cot[c + d*x^2])/(2*d) + (b^2*Log[Sin[c + d*x
^2]])/(2*d^2) + (I*a*b*PolyLog[2, -E^(I*(c + d*x^2))])/d^2 - (I*a*b*PolyLog[2, E^(I*(c + d*x^2))])/d^2

Rule 4205

Int[((a_.) + Csc[(c_.) + (d_.)*(x_)^(n_)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Csc[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rule 4190

Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[
(c + d*x)^m, (a + b*Csc[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]

Rule 4183

Int[csc[(e_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[(-2*(c + d*x)^m*ArcTanh[E^(I*(e + f*
x))])/f, x] + (-Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Log[1 - E^(I*(e + f*x))], x], x] + Dist[(d*m)/f, Int[(c +
d*x)^(m - 1)*Log[1 + E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e, f}, x] && IGtQ[m, 0]

Rule 2279

Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]

Rule 2391

Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> -Simp[PolyLog[2, -(c*e*x^n)]/n, x] /; FreeQ[{c, d,
 e, n}, x] && EqQ[c*d, 1]

Rule 4184

Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> -Simp[((c + d*x)^m*Cot[e + f*x])/f, x]
+ Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 3475

Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Log[RemoveContent[Cos[c + d*x], x]]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int x^3 \left (a+b \csc \left (c+d x^2\right )\right )^2 \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int x (a+b \csc (c+d x))^2 \, dx,x,x^2\right )\\ &=\frac{1}{2} \operatorname{Subst}\left (\int \left (a^2 x+2 a b x \csc (c+d x)+b^2 x \csc ^2(c+d x)\right ) \, dx,x,x^2\right )\\ &=\frac{a^2 x^4}{4}+(a b) \operatorname{Subst}\left (\int x \csc (c+d x) \, dx,x,x^2\right )+\frac{1}{2} b^2 \operatorname{Subst}\left (\int x \csc ^2(c+d x) \, dx,x,x^2\right )\\ &=\frac{a^2 x^4}{4}-\frac{2 a b x^2 \tanh ^{-1}\left (e^{i \left (c+d x^2\right )}\right )}{d}-\frac{b^2 x^2 \cot \left (c+d x^2\right )}{2 d}-\frac{(a b) \operatorname{Subst}\left (\int \log \left (1-e^{i (c+d x)}\right ) \, dx,x,x^2\right )}{d}+\frac{(a b) \operatorname{Subst}\left (\int \log \left (1+e^{i (c+d x)}\right ) \, dx,x,x^2\right )}{d}+\frac{b^2 \operatorname{Subst}\left (\int \cot (c+d x) \, dx,x,x^2\right )}{2 d}\\ &=\frac{a^2 x^4}{4}-\frac{2 a b x^2 \tanh ^{-1}\left (e^{i \left (c+d x^2\right )}\right )}{d}-\frac{b^2 x^2 \cot \left (c+d x^2\right )}{2 d}+\frac{b^2 \log \left (\sin \left (c+d x^2\right )\right )}{2 d^2}+\frac{(i a b) \operatorname{Subst}\left (\int \frac{\log (1-x)}{x} \, dx,x,e^{i \left (c+d x^2\right )}\right )}{d^2}-\frac{(i a b) \operatorname{Subst}\left (\int \frac{\log (1+x)}{x} \, dx,x,e^{i \left (c+d x^2\right )}\right )}{d^2}\\ &=\frac{a^2 x^4}{4}-\frac{2 a b x^2 \tanh ^{-1}\left (e^{i \left (c+d x^2\right )}\right )}{d}-\frac{b^2 x^2 \cot \left (c+d x^2\right )}{2 d}+\frac{b^2 \log \left (\sin \left (c+d x^2\right )\right )}{2 d^2}+\frac{i a b \text{Li}_2\left (-e^{i \left (c+d x^2\right )}\right )}{d^2}-\frac{i a b \text{Li}_2\left (e^{i \left (c+d x^2\right )}\right )}{d^2}\\ \end{align*}

Mathematica [B]  time = 4.915, size = 268, normalized size = 2.14 \[ \frac{4 a b \left (2 \tan ^{-1}(\tan (c)) \tanh ^{-1}\left (\cos (c)-\sin (c) \tan \left (\frac{d x^2}{2}\right )\right )+\frac{\sec (c) \left (i \text{PolyLog}\left (2,-e^{i \left (\tan ^{-1}(\tan (c))+d x^2\right )}\right )-i \text{PolyLog}\left (2,e^{i \left (\tan ^{-1}(\tan (c))+d x^2\right )}\right )+\left (\tan ^{-1}(\tan (c))+d x^2\right ) \left (\log \left (1-e^{i \left (\tan ^{-1}(\tan (c))+d x^2\right )}\right )-\log \left (1+e^{i \left (\tan ^{-1}(\tan (c))+d x^2\right )}\right )\right )\right )}{\sqrt{\sec ^2(c)}}\right )+d x^2 \left (a^2 d x^2-2 b^2 \cot (c)\right )+2 b^2 d x^2 \cot (c)+b^2 d x^2 \csc \left (\frac{c}{2}\right ) \sin \left (\frac{d x^2}{2}\right ) \csc \left (\frac{1}{2} \left (c+d x^2\right )\right )+b^2 d x^2 \sec \left (\frac{c}{2}\right ) \sin \left (\frac{d x^2}{2}\right ) \sec \left (\frac{1}{2} \left (c+d x^2\right )\right )-2 b^2 \left (d x^2 \cot (c)-\log \left (\sin \left (c+d x^2\right )\right )\right )}{4 d^2} \]

Warning: Unable to verify antiderivative.

[In]

Integrate[x^3*(a + b*Csc[c + d*x^2])^2,x]

[Out]

(2*b^2*d*x^2*Cot[c] + d*x^2*(a^2*d*x^2 - 2*b^2*Cot[c]) - 2*b^2*(d*x^2*Cot[c] - Log[Sin[c + d*x^2]]) + 4*a*b*(2
*ArcTan[Tan[c]]*ArcTanh[Cos[c] - Sin[c]*Tan[(d*x^2)/2]] + (((d*x^2 + ArcTan[Tan[c]])*(Log[1 - E^(I*(d*x^2 + Ar
cTan[Tan[c]]))] - Log[1 + E^(I*(d*x^2 + ArcTan[Tan[c]]))]) + I*PolyLog[2, -E^(I*(d*x^2 + ArcTan[Tan[c]]))] - I
*PolyLog[2, E^(I*(d*x^2 + ArcTan[Tan[c]]))])*Sec[c])/Sqrt[Sec[c]^2]) + b^2*d*x^2*Csc[c/2]*Csc[(c + d*x^2)/2]*S
in[(d*x^2)/2] + b^2*d*x^2*Sec[c/2]*Sec[(c + d*x^2)/2]*Sin[(d*x^2)/2])/(4*d^2)

________________________________________________________________________________________

Maple [F]  time = 0.325, size = 0, normalized size = 0. \begin{align*} \int{x}^{3} \left ( a+b\csc \left ( d{x}^{2}+c \right ) \right ) ^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^3*(a+b*csc(d*x^2+c))^2,x)

[Out]

int(x^3*(a+b*csc(d*x^2+c))^2,x)

________________________________________________________________________________________

Maxima [B]  time = 1.46267, size = 819, normalized size = 6.55 \begin{align*} \text{result too large to display} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*csc(d*x^2+c))^2,x, algorithm="maxima")

[Out]

1/4*a^2*x^4 - (4*b^2*d*x^2*cos(2*d*x^2 + 2*c) + 4*I*b^2*d*x^2*sin(2*d*x^2 + 2*c) - (4*a*b*d*x^2 - 2*b^2 - 2*(2
*a*b*d*x^2 - b^2)*cos(2*d*x^2 + 2*c) - (4*I*a*b*d*x^2 - 2*I*b^2)*sin(2*d*x^2 + 2*c))*arctan2(sin(d*x^2 + c), c
os(d*x^2 + c) + 1) - (2*b^2*cos(2*d*x^2 + 2*c) + 2*I*b^2*sin(2*d*x^2 + 2*c) - 2*b^2)*arctan2(sin(d*x^2 + c), c
os(d*x^2 + c) - 1) + (4*a*b*d*x^2*cos(2*d*x^2 + 2*c) + 4*I*a*b*d*x^2*sin(2*d*x^2 + 2*c) - 4*a*b*d*x^2)*arctan2
(sin(d*x^2 + c), -cos(d*x^2 + c) + 1) - (4*a*b*cos(2*d*x^2 + 2*c) + 4*I*a*b*sin(2*d*x^2 + 2*c) - 4*a*b)*dilog(
-e^(I*d*x^2 + I*c)) + (4*a*b*cos(2*d*x^2 + 2*c) + 4*I*a*b*sin(2*d*x^2 + 2*c) - 4*a*b)*dilog(e^(I*d*x^2 + I*c))
 + (2*I*a*b*d*x^2 - I*b^2 + (-2*I*a*b*d*x^2 + I*b^2)*cos(2*d*x^2 + 2*c) + (2*a*b*d*x^2 - b^2)*sin(2*d*x^2 + 2*
c))*log(cos(d*x^2 + c)^2 + sin(d*x^2 + c)^2 + 2*cos(d*x^2 + c) + 1) + (-2*I*a*b*d*x^2 - I*b^2 + (2*I*a*b*d*x^2
 + I*b^2)*cos(2*d*x^2 + 2*c) - (2*a*b*d*x^2 + b^2)*sin(2*d*x^2 + 2*c))*log(cos(d*x^2 + c)^2 + sin(d*x^2 + c)^2
 - 2*cos(d*x^2 + c) + 1))/(-4*I*d^2*cos(2*d*x^2 + 2*c) + 4*d^2*sin(2*d*x^2 + 2*c) + 4*I*d^2)

________________________________________________________________________________________

Fricas [B]  time = 0.590094, size = 1148, normalized size = 9.18 \begin{align*} \frac{a^{2} d^{2} x^{4} \sin \left (d x^{2} + c\right ) - 2 \, b^{2} d x^{2} \cos \left (d x^{2} + c\right ) - 2 i \, a b{\rm Li}_2\left (\cos \left (d x^{2} + c\right ) + i \, \sin \left (d x^{2} + c\right )\right ) \sin \left (d x^{2} + c\right ) + 2 i \, a b{\rm Li}_2\left (\cos \left (d x^{2} + c\right ) - i \, \sin \left (d x^{2} + c\right )\right ) \sin \left (d x^{2} + c\right ) - 2 i \, a b{\rm Li}_2\left (-\cos \left (d x^{2} + c\right ) + i \, \sin \left (d x^{2} + c\right )\right ) \sin \left (d x^{2} + c\right ) + 2 i \, a b{\rm Li}_2\left (-\cos \left (d x^{2} + c\right ) - i \, \sin \left (d x^{2} + c\right )\right ) \sin \left (d x^{2} + c\right ) -{\left (2 \, a b d x^{2} - b^{2}\right )} \log \left (\cos \left (d x^{2} + c\right ) + i \, \sin \left (d x^{2} + c\right ) + 1\right ) \sin \left (d x^{2} + c\right ) -{\left (2 \, a b d x^{2} - b^{2}\right )} \log \left (\cos \left (d x^{2} + c\right ) - i \, \sin \left (d x^{2} + c\right ) + 1\right ) \sin \left (d x^{2} + c\right ) -{\left (2 \, a b c - b^{2}\right )} \log \left (-\frac{1}{2} \, \cos \left (d x^{2} + c\right ) + \frac{1}{2} i \, \sin \left (d x^{2} + c\right ) + \frac{1}{2}\right ) \sin \left (d x^{2} + c\right ) -{\left (2 \, a b c - b^{2}\right )} \log \left (-\frac{1}{2} \, \cos \left (d x^{2} + c\right ) - \frac{1}{2} i \, \sin \left (d x^{2} + c\right ) + \frac{1}{2}\right ) \sin \left (d x^{2} + c\right ) + 2 \,{\left (a b d x^{2} + a b c\right )} \log \left (-\cos \left (d x^{2} + c\right ) + i \, \sin \left (d x^{2} + c\right ) + 1\right ) \sin \left (d x^{2} + c\right ) + 2 \,{\left (a b d x^{2} + a b c\right )} \log \left (-\cos \left (d x^{2} + c\right ) - i \, \sin \left (d x^{2} + c\right ) + 1\right ) \sin \left (d x^{2} + c\right )}{4 \, d^{2} \sin \left (d x^{2} + c\right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*csc(d*x^2+c))^2,x, algorithm="fricas")

[Out]

1/4*(a^2*d^2*x^4*sin(d*x^2 + c) - 2*b^2*d*x^2*cos(d*x^2 + c) - 2*I*a*b*dilog(cos(d*x^2 + c) + I*sin(d*x^2 + c)
)*sin(d*x^2 + c) + 2*I*a*b*dilog(cos(d*x^2 + c) - I*sin(d*x^2 + c))*sin(d*x^2 + c) - 2*I*a*b*dilog(-cos(d*x^2
+ c) + I*sin(d*x^2 + c))*sin(d*x^2 + c) + 2*I*a*b*dilog(-cos(d*x^2 + c) - I*sin(d*x^2 + c))*sin(d*x^2 + c) - (
2*a*b*d*x^2 - b^2)*log(cos(d*x^2 + c) + I*sin(d*x^2 + c) + 1)*sin(d*x^2 + c) - (2*a*b*d*x^2 - b^2)*log(cos(d*x
^2 + c) - I*sin(d*x^2 + c) + 1)*sin(d*x^2 + c) - (2*a*b*c - b^2)*log(-1/2*cos(d*x^2 + c) + 1/2*I*sin(d*x^2 + c
) + 1/2)*sin(d*x^2 + c) - (2*a*b*c - b^2)*log(-1/2*cos(d*x^2 + c) - 1/2*I*sin(d*x^2 + c) + 1/2)*sin(d*x^2 + c)
 + 2*(a*b*d*x^2 + a*b*c)*log(-cos(d*x^2 + c) + I*sin(d*x^2 + c) + 1)*sin(d*x^2 + c) + 2*(a*b*d*x^2 + a*b*c)*lo
g(-cos(d*x^2 + c) - I*sin(d*x^2 + c) + 1)*sin(d*x^2 + c))/(d^2*sin(d*x^2 + c))

________________________________________________________________________________________

Sympy [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int x^{3} \left (a + b \csc{\left (c + d x^{2} \right )}\right )^{2}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**3*(a+b*csc(d*x**2+c))**2,x)

[Out]

Integral(x**3*(a + b*csc(c + d*x**2))**2, x)

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (b \csc \left (d x^{2} + c\right ) + a\right )}^{2} x^{3}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^3*(a+b*csc(d*x^2+c))^2,x, algorithm="giac")

[Out]

integrate((b*csc(d*x^2 + c) + a)^2*x^3, x)